#include "loader.hpp"
#include "processor.hpp"
using namespace std;
std::map<uint64_t, Semaphore<std::array<char, 4096>>> memory;
int main()
{
	IOMessage io = IOMessage();
	Processor cores = Processor(1, &io);
	IOChannel ioctrl = IOChannel(&io);
	loadFile("boot.bin");
	ioctrl.init();
	cores.boot();
	std::thread tIO = std::thread(&IOChannel::run, &ioctrl);
	std::thread tProc = std::thread(&Processor::run, &cores);
	tIO.detach();
	tProc.join();
	return 0;
}